Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

174
Vistas
TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: Required option "message" is of type: _MESSAGE; expected a non-empty value. (Discord.js)

Why does this code throw error?

client.on("interaction", interaction => {
  if (!interaction.isContextMenu()) return;
  const msg = interaction.getMessage("message", true);
});
TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: Required option "message" is of type: _MESSAGE; expected a non-empty value.

I'm using discord.js v 13 and the djs server couldn't help me.

Please help? thank you

Btw I have no intents because this is going to be application.commands only bot, so I have intents of intents: []

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Even though other sources may outline that you don't need any intents for an interaction-only bot that has only the application.commands scope, discord.js requires the GUILDS or 1 scope.

Your new client constructor should be:

const client = new Client({
  intents: 1,
  // ... rest of the client constructor
});

Also, the interaction event is deprecated. Use interactionCreate instead, it's the exact same thing, just a different name.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda